<?php
import('baseview.class.php');

define('LOGIN_F_UNKOWN_UUID', 121);
define('LOGIN_F_NEED_UUID',122);
define('LOGIN_F_UNKOWN_RESON',123);
define('LOGIN_F_NEED_LOGIN',124);
define('LOGIN_S_OK',100);

class ViewLogin extends BaseView{
	
	public function getViewByCode($code){
		switch($code){
			case LOGIN_S_OK:
				return parent::getSuccessView(LOGIN_S_OK, '');
				break;
			case LOGIN_F_NEED_UUID:
				return parent::getFailedView(LOGIN_F_NEED_UUID, 'UUID is need.');
				break;
			case LOGIN_F_UNKOWN_UUID:
				return parent::getFailedView(LOGIN_F_UNKOWN_UUID, 'UUID is incorrent.');
				break;
			case LOGIN_F_NEED_LOGIN:
				return parent::getFailedView(LOGIN_F_NEED_LOGIN, 'Login first.');
			case LOGIN_F_UNKOWN_RESON:
			default:
				return parent::getFailedView(LOGIN_F_UNKOWN_RESON, 'Unkown reson!');
				break;
		}
	}
}